package com.tuozixuan.javafx.scene;


import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.stage.Stage;

public class SceneDemo extends Application {
	
    public static void main(String[] args) {
        launch(args);
    }

	@Override
	public void start(Stage primaryStage) throws Exception {
		
		Text text = new Text(10, 40, "Hello World!");
        text.setFont(new Font(40));
        Scene scene = new Scene(new Group(text), 300, 300);

        primaryStage.setTitle("Welcome to JavaFX!");
        primaryStage.setScene(scene);
        primaryStage.sizeToScene();
        primaryStage.show();
	}

}
